CC=arm-apple-darwin9-gcc

CFLAGS=-I/var/include -v -O2 -std=gnu99

LD=$(CC)
LDFLAGS = \
		-L"/usr/lib" \
		-F"/System/Library/Frameworks" \
		-F"/System/Library/PrivateFrameworks" \
		-bind_at_load \
		-framework CoreFoundation \
		-framework Foundation \
		-framework UIKit \
		-framework GraphicsServices \
		-framework CoreGraphics \
		-framework CoreSurface \
		-framework AudioToolbox \
		-lobjc \
		-multiply_defined suppress

TARGET=TouchRemocon.app/TouchRemocon_
OBJECTS=main.o Application.o PadPanel.o MediaPanel.o TVPanel.o NumericPanel.o KeyboardPanel.o TextView.o PreferencesView.o Tools.o

all:	$(TARGET)

$(TARGET):	$(OBJECTS)
	$(LD) $(LDFLAGS) -o $@ $^
	strip $@
	/usr/bin/ldid -S $@

%.o:	%.m
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
		rm -f *.o
